#ifndef SEQUENCEPLAYBAR_H
#define SEQUENCEPLAYBAR_H

#include <QWidget>

namespace Ui {
class SequencePlaybar;
}

class ActionListController;
class SequenceRunner;
class ITimerService;
class TimeoutListener;

/**
 * controller for Sequence Viewer
 */
class SequencePlaybar : public QWidget
{
   Q_OBJECT

public:
   explicit SequencePlaybar( ActionListController &actionController, SequenceRunner &runner,
                             ITimerService *timer, QWidget *parent = 0);
   ~SequencePlaybar();

signals:
   void editRequest();
   void deleteRequest();

public slots:
   void onTimeToNextEventChange(int timeMs);

private slots:
   void onActiveRowChanged(int newRow);
   void onTimerTick();
   void onSequenceRunningChange(bool running);

//GUI
   void on_deleteButton_clicked();

private:
   void setCountDownTimeMs(int timeMs);

private:
   Ui::SequencePlaybar *ui;
   ITimerService *m_timer;
   TimeoutListener *m_tickCallback;

   int m_countDownMs;
};

#endif // SEQUENCEPLAYBAR_H
